# -*- encoding: utf-8 -*-
'''
@File    :   5_dog.py
@Time    :   2022/12/15 16:37:32
@Author  :   Cms 
@Version :   1.0
@Contact :   2267000140@qq.com
@WebSite    :   www.baidu.com
'''

# here put the import lib
class Dog(object):
    blood = 80
    times = 0
    aggress = 15 - times*3


    def isalive(self):
        if self.blood >0:
            print("当前血量为：",self.blood)
        else:
            print("当前狗死亡")
    
    # 第一个参数代表对方的攻击力
    def attacked(self,arg1):
        if arg1<=0:
            pass
        else:
            print("狗遭受到攻击！")
            self.times += 1
            self.blood -= arg1